﻿<%@ Assembly Name="MII_FIF, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f02eab3637bedb94" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Register Src="../../../../_controltemplates/15/MII_FIF/Header.ascx" TagPrefix="UC" TagName="Header" %>
<%@ Register Src="../../../../_controltemplates/15/MII_FIF/LeftMenu.ascx" TagPrefix="UC" TagName="LeftMenu" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FormDataCabang.aspx.cs" Inherits="MII_FIF.Layouts.MII_FIF.FormDataCabang" DynamicMasterPageFile="~masterurl/default.master" %>

<asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">
</asp:Content>

<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
    <link href="../JQuery/jquery-ui-1.10.3.custom/css/ui-lightness/jquery-ui-1.10.3.custom.min.css" rel="stylesheet" />
    <script src="../JQuery/jquery-ui-1.10.3.custom/js/jquery-1.9.1.js" type="text/javascript"></script>
    <script src="../JQuery/jquery-ui-1.10.3.custom/js/jquery-ui-1.10.3.custom.min.js" type="text/javascript"></script>
    <link href="../Style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        function MyDatePickerInit() {

            $(function () {
                $("#<%= txtDate.ClientID %>").datepicker({
                    dateFormat: 'd M yy', changeMonth: true, changeYear: true, yearRange: "c-100:c+100",
                    monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
                });
            });

            $('.DatePicker').datepicker({
                dateFormat: 'd M yy', changeMonth: true, changeYear: true, yearRange: "c-100:c+100",
                monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
            });
            $(function () {
                $('#<%= txtDate.ClientID %>').attr('readonly', true);
            });
            $(".DatePicker").attr('readonly', true);
        }

        var prm = Sys.WebForms.PageRequestManager.getInstance();
        prm.add_endRequest(EndRequest);
        function EndRequest(sender, args) {
            MyDatePickerInit();
        }

        $(function () {
            MyDatePickerInit();
        });

        function CheckTheCheckBoxes(dename) {
            var deid = "";
            var elem = document.forms[0].elements;
            for (var i = 0; i < elem.length; i++) {
                if (elem[i].name != null) {
                    if (elem[i].name.indexOf(dename) != -1) {
                        if (elem[i].disabled == false) {
                            elem[i].checked = document.getElementById('chkSelectAll').checked;
                        }
                    }
                }
            }
            return deid;
        }
    </script>

    <div>
        <table class="TableLuar">
            <tr>
                <td class="LeftMenu">
                    <UC:LeftMenu runat="server" id="LeftMenu" />
                </td>
                <td style="vertical-align: top;">
                    <table class="TableDalam">
                        <tr>
                            <td colspan="4">
                                <UC:Header runat="server" ID="Header"></UC:Header>
                            </td>
                        </tr>
                        <tr>
                            <td class="KolomKiri">Engineer</td>
                            <td>
                                <asp:Label runat="server" ID="lblEngineer"></asp:Label>
                            </td>
                            <td class="kolomKanan">Date
                                <label style="color: red">*</label>
                            </td>
                            <td>
                                <asp:TextBox runat="server" ID="txtDate"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td class="KolomKiri">Kode Cabang
                                <label style="color: red">*</label></td>
                            <td>
                                <asp:TextBox runat="server" ID="txtKodeCabang"></asp:TextBox></td>
                            <td class="kolomKanan">PIC
                                <label style="color: red">*</label></td>
                            <td>
                                <asp:TextBox runat="server" ID="txtPIC"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td class="KolomKiri">Nama Cabang
                                <label style="color: red">*</label></td>
                            <td>
                                <asp:TextBox runat="server" ID="txtNamaCabang"></asp:TextBox></td>
                            <td class="KolomKanan">HP</td>
                            <td>
                                <asp:TextBox runat="server" ID="txtHP"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td class="KolomKiri">Nama Lokasi
                                <label style="color: red">*</label></td>
                            <td>
                                <asp:TextBox runat="server" ID="txtNamaLokasi"></asp:TextBox></td>
                            <td class="KolomKanan">Telp</td>
                            <td>
                                <asp:TextBox runat="server" ID="txtTelp"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td class="KolomKiri">Alamat
                                <label style="color: red">*</label></td>
                            <td colspan="3">
                                <asp:TextBox runat="server" ID="txtALamat" TextMode="MultiLine" Width="100%" Height="100px"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td class="KolomKiri">Tipe Router
                                <label style="color: red">*</label></td>
                            <td>
                                <asp:DropDownList runat="server" ID="DDLTipeRouter"></asp:DropDownList></td>
                            <td class="KolomKiri">SID
                                <label style="color: red">*</label></td>
                            <td>
                                <asp:TextBox runat="server" ID="txtSID"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td class="KolomKiri">Serial Number
                                <label style="color: red">*</label></td>
                            <td>
                                <asp:TextBox runat="server" ID="txtSN"></asp:TextBox></td>
                            <td class="KolomKanan">Bandwidth
                                <label style="color: red">*</label></td>
                            <td>
                                <asp:DropDownList runat="server" ID="DDLBandwidth">
                                    <asp:ListItem Text="32" Value="32"></asp:ListItem>
                                    <asp:ListItem Text="64" Value="64"></asp:ListItem>
                                    <asp:ListItem Text="128" Value="128"></asp:ListItem>
                                    <asp:ListItem Text="256" Value="256"></asp:ListItem>
                                    <asp:ListItem Text="512" Value="512"></asp:ListItem>
                                </asp:DropDownList></td>
                        </tr>
                        <tr>
                            <td class="KolomKiri">IP LAN
                                <label style="color: red">*</label></td>
                            <td>
                                <asp:TextBox runat="server" ID="txtIPLAN"></asp:TextBox></td>
                            <td class="KolomKanan">IP WAN
                                <label style="color: red">*</label></td>
                            <td>
                                <asp:TextBox runat="server" ID="txtIPWAN"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td class="KolomKiri">Nama NAS
                                <label style="color: red">*</label></td>
                            <td>
                                <asp:TextBox runat="server" ID="txtNamaNAS"></asp:TextBox></td>
                            <td class="KolomKanan">IP NAS
                                <label style="color: red">*</label></td>
                            <td>
                                <asp:TextBox runat="server" ID="txtIPNAS"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td class="KolomKiri">Tipe NAS
                                <label style="color: red">*</label></td>
                            <td>
                                <asp:DropDownList runat="server" ID="DDLTipeNAS"></asp:DropDownList></td>
                            <td class="KolomKanan">Provider
                                <label style="color: red">*</label></td>
                            <td>
                                <asp:DropDownList runat="server" ID="DDLProviderNAS"></asp:DropDownList></td>
                        </tr>
                        <tr>
                            <td colspan="4">
                                <asp:Panel GroupingText="Jumlah Komputer" runat="server" ID="PnlJmlKomputer">
                                    <table style="width: 100%;">
                                        <tr>
                                            <td>PC
                                                <label style="color: red">*</label></td>
                                            <td>
                                                <asp:TextBox runat="server" ID="txtJmlPC"></asp:TextBox></td>
                                            <td>Notebook
                                                <label style="color: red">*</label></td>
                                            <td>
                                                <asp:TextBox runat="server" ID="txtJmlNotebook"></asp:TextBox></td>
                                            <td>TC
                                                <label style="color: red">*</label></td>
                                            <td>
                                                <asp:TextBox runat="server" ID="txtJmlTC"></asp:TextBox></td>
                                        </tr>
                                    </table>
                                </asp:Panel>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="4">
                                <asp:Panel ID="PnlPrinter" runat="server" GroupingText="Printer">
                                    <table style="width: 100%;">
                                        <tr>
                                            <td>Tipe Printer
                                                <label style="color: red">*</label>
                                            </td>
                                            <td>
                                                <asp:DropDownList runat="server" ID="DDLTipePrinter"></asp:DropDownList>
                                            </td>
                                            <td>Jumlah Printer
                                                <label style="color: red">*</label>
                                            </td>
                                            <td>
                                                <asp:TextBox runat="server" ID="txtJmlPrinter"></asp:TextBox></td>
                                            <td>
                                                <asp:Button runat="server" ID="btnAdd" Text="Add" /></td>
                                        </tr>
                                        <tr>
                                            <td colspan="4">
                                                <asp:GridView runat="server" ID="GridPrinter" AutoGenerateColumns="false" CssClass="grid">
                                                    <EmptyDataTemplate>
                                                        Data Kosong
                                                    </EmptyDataTemplate>
                                                    <Columns>
                                                        <asp:TemplateField HeaderStyle-Width="25px">
                                                            <HeaderTemplate>
                                                                <input type="checkbox" name="chkSelectAll" id="chkSelectAll" onclick="CheckTheCheckBoxes('chk');" />
                                                            </HeaderTemplate>
                                                            <ItemTemplate>
                                                                <asp:CheckBox runat="server" ID="chk" />
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Tipe Printer">
                                                            <ItemTemplate>
                                                                <asp:Label runat="server" ID="lblTipePrinter" Text='<%# Bind("[Nama Printer]") %>'></asp:Label>
                                                            </ItemTemplate>
                                                            <EditItemTemplate>
                                                                <asp:DropDownList runat="server" ID="DDLTipePrinter"></asp:DropDownList>
                                                            </EditItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="Jumlah Printer">
                                                            <ItemTemplate>
                                                                <asp:Label runat="server" ID="lblJumlahPrinter" Text='<%# Bind("Jumlah") %>'></asp:Label>
                                                            </ItemTemplate>
                                                            <EditItemTemplate>
                                                                <asp:TextBox runat="server" ID="txtJumlahPrinter" Text='<%# Bind("Jumlah") %>'></asp:TextBox>
                                                            </EditItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:BoundField DataField="ID" HeaderStyle-CssClass="hidden" ItemStyle-CssClass="hidden"
                                                            FooterStyle-CssClass="hidden" />
                                                        <asp:BoundField DataField="ID_Printer" HeaderStyle-CssClass="hidden" ItemStyle-CssClass="hidden"
                                                            FooterStyle-CssClass="hidden" />
                                                        <asp:TemplateField HeaderText="Action">
                                                            <ItemTemplate>
                                                                <asp:Button runat="server" ID="btnEdit" Text="Edit" CommandName="Edit" />
                                                            </ItemTemplate>
                                                            <EditItemTemplate>
                                                                <table>
                                                                    <tr>
                                                                        <td>
                                                                            <asp:Button runat="server" ID="btnSave" Text="Save" CommandName="Update" />
                                                                        </td>
                                                                        <td>
                                                                            <asp:Button runat="server" ID="btncancel" Text="Cancel" CommandName="Cancel" />
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </EditItemTemplate>
                                                        </asp:TemplateField>
                                                    </Columns>
                                                </asp:GridView>
                                                <br />
                                                <br />
                                                <asp:Button runat="server" ID="btnDelete" Text="Delete" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="4">
                                                <asp:Label runat="server" ID="lblError" CssClass="errorMsg"></asp:Label>
                                            </td>
                                        </tr>
                                    </table>
                                </asp:Panel>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="4" align="right">
                                <asp:Button runat="server" ID="btnSubmit" Text="Submit" />
                                &nbsp;&nbsp;&nbsp;&nbsp;
                                <asp:Button runat="server" ID="btnCancel" Text="Cancel" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>

<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
    Form Data Cabang
</asp:Content>

<asp:Content ID="PageTitleInTitleArea" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server">
</asp:Content>
